import { createRouter, createWebHistory } from 'vue-router'

import Login from "@/pages/Login.vue";
import Demo from "@/pages/Demo.vue";
import Login2 from "@/pages/Login_back.vue";
import EleDragger from "@/pages/EleDragger.vue";
import ReadSvg2 from "@/pages/ReadSvg2.vue";
import ReadSvg from "@/pages/ReadSvg.vue";
import DraggerSort from "@/components/DraggerSort.vue";
import Demo2 from '@/pages/Demo2.vue';
import Demo2as10 from '@/pages/Demo2as10.vue';
import DemoSvgjs from '@/pages/DemoSvgjs.vue';

import DemoThree01 from '@/three_3d/DemoThree01.vue';
import DemoThree02 from '@/three_3d/DemoThree02.vue';
import DemoThree03 from '@/three_3d/DemoThree03.vue';

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHistory("/"),

  routes: [
    {
      path: "/3d01",
      component: DemoThree01,
    },
    {
      path: "/3d02",
      component: DemoThree02,
    },
    {
      path: "/3d03",
      component: DemoThree03,
    },
    {
      path: "/demosvgjs",
      component: () => import('@/pages/DemoSvgjs.vue'),
    },
    {
      path: "/readsvg",
      component: () => import('@/pages/ReadSvg.vue'),
    },
    {
      path: "/readsvg2",
      component: () => import('@/pages/ReadSvg2.vue'),
    },
    {
      path: '/demo',
      component: Demo,
    },
    {
      path: '/demo2',
      component: Demo2,
    },
    {
      path: '/demo2as10',
      component: Demo2as10,
    },
    {
      path: '/flow',
      component: () => import('@/pages/Flow.vue'),
    },
    {
      path: "/com",
      component: DraggerSort,
    },

    {
      path: "/login",
      component: Login,
    },
    {
      path: "/dragger",
      component: EleDragger,
    },

    {
      path: "/login2",
      component: Login2,
    },

    {
      path: "/",
      redirect: "/login",
    },


  ]

})

export default router
